1. Field of the Invention
The present invention relates generally to database query methods, and more particularly, to a system for interfacing an application program with more than one database instance.
2. Description of Related Art
Queries to a database from an application program have historically been written with a specific database instance (data model) in mind. The application is thus typically tailored to generate database query commands of the form required for the specific database. Since each database model has its own set of data query/access commands, the application program must be re-coded and re-assembled in order to access a database other than the one with which it was originally designed to interface. Therefore, not only is it time consuming and costly to re-program an application to provide access to a different database, the application must also be re-tested after the new database query commands have been retrofitted into the application. The testing procedure is also time consuming, and it may be difficult to ensure that the revised application is as robust as the original application without running the application in its real-world environment, a situation which may entail a certain amount of undesirable risk.
There are a number of reasons why application programs are tailored for a specific type of database. These reasons include performance considerations as well as the fact that such tailoring has simply been the ‘normal’ way to program a database-related application. Furthermore, since the structure of the database is typically known in advance, it is seemingly ‘natural’ to structure the database queries in accordance with the structure of the database and known features of a particular database query language. It has heretofore also been assumed that acceptable performance of most applications utilizing database queries could be achieved only by using ‘built-in’ queries tailored specifically for the database's particular query language. Therefore, when it is required that an application be run with a database other than the one for which the application was originally intended, the application must be re-programmed. Re-programming is time consuming and requires that the modified application program also be re-tested. Re-testing of the application not only requires further time and effort, but also introduces an additional risk of having undetected errors present in the application when it is introduced back into the user environment.
Thus, a mechanism is needed which enables a given application program to run with any type of database and associated query language without incurring the overhead and risk associated with re-programming and re-testing the application for each different database type.